package edu.uoc.tdp.pac4.common;

import java.rmi.RemoteException;
import java.util.Date;
import java.util.List;

import edu.uoc.tdp.pac4.beans.Attendance;
import edu.uoc.tdp.pac4.beans.Aula;
import edu.uoc.tdp.pac4.beans.Course;
import edu.uoc.tdp.pac4.beans.Group;
import edu.uoc.tdp.pac4.beans.Registration;
import edu.uoc.tdp.pac4.beans.Shift;
import edu.uoc.tdp.pac4.beans.Usuari;

public interface AcademicManagementInterface extends java.rmi.Remote {
	
	public List<Group> listGroup () throws RemoteException;


	
	public Group saveGroup(String name, int maxStudents,
			int availableSpots, Date startDate, Date finalDate, boolean activeGroup, Course course, Shift shift) throws RemoteException;
	public Group updateGroup(int grupoid, String name, int maxStudents,	int availableSpots, Date startDate, Date finalDate, boolean activeGroup, Course course, Shift shift) throws RemoteException;
	public Group getGroup(Integer identificador) throws RemoteException;
	public List<Group> findGroup(String name, Shift shift, Boolean actiu) throws RemoteException;
	public Group findGroupByNameAndShift(String name, Shift shift) throws RemoteException;
	public Group updateGroup(int groupId, int availableSpots) throws RemoteException;
	public void saveResources(int i, Aula aula, Usuari prof) throws RemoteException;
	public List<Group> listGroupsByProf(String profId) throws RemoteException;
	public List<Group> listGroupsByAula(int idAula)throws RemoteException;

	public Registration getRegistration(Integer identificador) throws RemoteException;
	public List<Registration> listRegistration() throws RemoteException;
	public Registration updateRegistration(int registrationId, int status, int groupId) throws RemoteException;
	public List<Registration> findRegistrations(String nom, int cursId, int statusInt) throws RemoteException;

	public List<Course> listCourses() throws RemoteException;
	public Course findCourseByName(String name) throws RemoteException;

	public List<Usuari> listTeachers() throws RemoteException;
	public Usuari findStudent(String userId) throws RemoteException;
	public Usuari findTeacherByNames(String firstname, String lastname) throws RemoteException;
	
	public List<Aula> listRooms() throws RemoteException;
	public Aula findRoomByName(String name) throws RemoteException;

	public Attendance saveAttendance(Group group) throws RemoteException;
	public void closeAttendance(Attendance attendance) throws RemoteException;
	public int countPresents(Attendance attendance) throws RemoteException;
	public void updateAttendance(int presents, int absents, Attendance attendance) throws RemoteException;
	public int countTotal(int groupid) throws RemoteException;



	

}
